vcTopologyPickService
TopologyPickService provides options for handling the selection and creation of points, lines, and curves using the interactiveTopologyPick command. Note 1: TopologyPickService should not be used at the same time by multiple scripts. Note 2: vcSnapService and vcTopologyPickService should not be used at the same time.
See in: Overview
Module: vcCore
Parent: -
Children -
Referenced by: vcApplication.TopologyPickService
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| ContinuousMode | Boolean | RW | Gets or sets the use of continuous curve selection in 3D world. |
| SnapOnCurve | Boolean | RW | Gets or sets the ability to select a curve. |
| SnapOnCurveLoop | Boolean | RW | Gets or sets the ability to select a curve loop. |
| SnapOnSurface | Boolean | RW | Gets or sets the ability to select a point on a face. |
| TargetAvailable | Boolean | R | Gets if pointing at a valid target. |
| TargetCurveAvailable | Boolean | R | Gets if pointing at an available curve. |
| TargetCurveIndex | Integer | R | Gets the index of an available curve. |
| TargetCurveLoopAvailable | Boolean | R | Gets if pointing at an available curve loop. |
| TargetCurveLoopIndex | Integer | R | Gets the index of an available curve loop. |
| TargetCurves | list[vcPickedTopologyCurveInfo] | R | Gets a list of vcPickedTopologyCurveInfo for target. |
| TargetGeometrySet | vcObject | R | Gets geometry set of a target. |
| TargetLocked | Boolean | R | Gets if target has been selected in 3D world. |
| TargetNode | vcObject | R | Gets the node containing target. |
| TargetNormal | vcVector | R | If available, gets surface normal of target. |
| TargetNormalAvailable | Boolean | R | Gets if surface normal is available for target. |
| TargetPosition | vcVector | R | Gets the position vector of target in World coordinate system. |
| TargetSurfaceAvailable | Boolean | R | Gets if pointing at an available point on surface. |
| TargetSurfaceIndex | Integer | R | Gets the index of an available surface. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| clear | None | None | Stops and resets the command and clears its target data (in every instance of both vcTopologyPickService and vcSnapService).See moreRemoves all registered callbacks (of this script). Triggers an OnCanceled event in this script (if called from outside and event handler) and in other scripts (always). |
| execute | None | None | Runs the vcTopologyPickService. Before calling this, make sure you call clear(). See moreThen (re)set the needed properties, (re)add the needed event handlers and finnaly call execute(). |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnCanceled | None | Triggered when the snap action is canceled.See moreIf not provided, the default implementation calls clear(). If provided, you handler should call clear() to avoid potential issues with other scripts using vcSnapService or vcTopologyPickService. |
| OnTargetAvailable | None | Triggered when pointer is hovering over a valid target in 3D world. |
| OnTargetSet | None | Triggered when a valid target has been selected in 3D world.See moreYour handler should call clear() to avoid potential issues with other scripts using vcSnapService or vcTopologyPickService. |
Example: Topology Selection Continuous
"""Implement continuous selection with the vcTopologyPickService and print target curves.""" import vcCore as vc def target_set(): print("TargetSet") for curve_info in cmd.TargetCurves: print(curve_info) app = vc.getApplication() cmd = app.TopologyPickService cmd.ContinuousMode = True cmd.OnTargetSet += target_set cmd.execute()